package Remote;
import Commands.*;

public class RemoteControl {

    Command[] buttons;
    int i;

    public RemoteControl() {
        buttons = new Command[10];

        Command noCommand = new NoCommand();
        for (i = 0; i < 10; i++) {
            buttons[i] = noCommand;
        }
    }

    public void setCommand(int slot, Command command) {
        buttons[slot] = command;
    }

    public void buttonWasPushed(int slot) {
        System.out.print("you pressed button " + slot + " ");
        buttons[slot].execute();
    }
}
